package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstHotSearchLogDTO;
import com.financing.wap.dao.IDstHotSearchLogDao;
import com.financing.wap.common.SqlName;
/**
 * dst_hot_search_log  
 * 用户搜索记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstHotSearchLogDao")
public class DstHotSearchLogDaoImpl extends BaseDaoImpl<DstHotSearchLogDTO, java.lang.Integer> implements IDstHotSearchLogDao {


	@Override
	public int insert(DstHotSearchLogDTO dstHotSearchLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstHotSearchLogSql.insert, dstHotSearchLog);
	}

	@Override
	public void update(DstHotSearchLogDTO dstHotSearchLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstHotSearchLogSql.update, dstHotSearchLog);
	}

	@Override
	public void updateForce(DstHotSearchLogDTO dstHotSearchLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstHotSearchLogSql.updateForce, dstHotSearchLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstHotSearchLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstHotSearchLogDTO> queryList(DstHotSearchLogDTO dstHotSearchLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstHotSearchLogSql.queryList, dstHotSearchLog);
	}

	@Override
	public int queryListCount(DstHotSearchLogDTO dstHotSearchLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstHotSearchLogSql.queryListCount, dstHotSearchLog);
	}

	@Override
	public DstHotSearchLogDTO loadById(Integer id) throws SQLException {
		return  (DstHotSearchLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstHotSearchLogSql.loadById,id);
	}

	@Override
	public Class<DstHotSearchLogDTO> getEntityClass() {
		return DstHotSearchLogDTO.class;
	}
 	
}
